Default the update period if not set

Glenn 'devalias' Grant 10 years ago
parent
commit
e7f078ae93
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/models/agents/weather_agent.rb

+ 1 - 1
app/models/agents/weather_agent.rb

@@ -51,7 +51,7 @@ module Agents
51 51
     default_schedule "8pm"
52 52
 
53 53
     def working?
54
-      event_created_within?(options['expected_update_period_in_days']) && !recent_error_logs?
54
+      event_created_within?(options['expected_update_period_in_days'].presence || 2) && !recent_error_logs?
55 55
     end
56 56
 
57 57
     def key_setup?